package com.benson.pattern.visitor;

public class Visitor {

	public void visitCompoiste(CompositeVisitable vi){
		Visitable[] v = vi.getChildren();
		
		for(Visitable c:v){
			c.accept(this);
		}
	}
	
	public void visitSimple(SimpleVisitable v){
		v.action();
	}
}
